<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Retrieves a header tag from an RPM file</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.rpm-get-tag" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">rpm_get_tag</h1>
  <p class="verinfo">(PECL rpmreader &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">rpm_get_tag</span> &mdash; <span class="dc-title">Retrieves a header tag from an RPM file</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.rpm-get-tag-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>rpm_get_tag</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$rpmr</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$tagnum</code></span>
   ) : <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span></div>

  <p class="para rdfs-comment">
    <span class="function"><strong>rpm_get_tag()</strong></span> will retrieve a given tag from
    the RPM file&#039;s header and return it.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.rpm-get-tag-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">rpmr</code></dt>

     <dd>

      <p class="para">
        A file pointer resource successfully opened by
        <span class="function"><a href="rpm_open.html" class="function">rpm_open()</a></span>.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">tagnum</code></dt>

     <dd>

      <p class="para">
        The tag number to retrieve from the RPM header.  This value
        can be specified using the list of constants defined by this
        module.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.rpm-get-tag-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
    The return value can be of various types depending on the
    <code class="parameter">tagnum</code> supplied to the function.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.rpm-get-tag-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4236">
    <p><strong>Example #1 <span class="function"><strong>rpm_get_tag()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$file&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"/path/to/file.rpm"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$rpmr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">rpm_open</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">rpm_get_tag</span><span style="color: #007700">(</span><span style="color: #0000BB">$rpmr</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">RPMREADER_NAME</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$name</span><span style="color: #DD0000">&lt;br&gt;\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">rpm_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$rpmr</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.rpm-get-tag-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="rpm_open.html" class="function" rel="rdfs-seeAlso">rpm_open()</a> - Opens an RPM file</span></li>
    <li class="member"><span class="function"><a href="rpm_close.html" class="function" rel="rdfs-seeAlso">rpm_close()</a> - Closes an RPM file</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>